﻿@model TimNilimaaConsulting.DeploymentWeb.ViewModels.NewComputerViewModel


    @{
    ViewBag.Title = "New Computer";
    }


    @using (Html.BeginForm())
{
        @Html.AntiForgeryToken()

        <div class="form-horizontal">
            <h2>New Computer</h2>
            <hr />
            @Html.ValidationSummary(true)


            <div class="form-group">
                @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.MacAddress, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.MacAddress)
                    @Html.ValidationMessageFor(model => model.MacAddress)
                </div>
            </div>


                            <div class="form-group">
                @Html.LabelFor(model => model.Collection, new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.DropDownListFor(model => model.CollectionId, new SelectList(ViewBag.Collections, "CollectionId", "CollectionName"))
                </div>
            </div>




            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="Create" class="btn btn-default" />
                </div>
            </div>
        </div>
}

    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>

    @section Scripts {
        @Scripts.Render("~/bundles/jqueryval")
    }
